package framework;

/**
 * This class represents a Board, implemented as an array of cells. This class
 * is used by client to pass in the initial board and cell information.
 * 
 */
public interface BoardInterface {
	/**
	 * Returns all cells on board.
	 * 
	 * @return CellInterface[] cellArray - all cells on the board
	 */
	public CellInterface[] getCells();

	/**
	 * Returns the total number of columns in the board, if the board is viewed
	 * as a 2d array.
	 * 
	 * @return int width - the total number of columns
	 */
	public int getTotalColNum();

	/**
	 * Returns the total number of rows in the board, if the board is viewed as
	 * a 2d array.
	 * 
	 * @return int height - the total number of rows
	 */
	public int getTotalRowNum();

	/**
	 * Returns the number of neighbors a cell has.
	 * 
	 * @return int numNbrs - the number of neighbors a cell has
	 */
	public int getNbrNum();

	/**
	 * Given a cell, this method returns its neighbors. Definition of what
	 * constitutes a neighbor is client-defined.
	 * 
	 * @param CellInterface c - a cell
	 * @return CellInterface[] neighborArray - all the neighbors of c
	 */
	public CellInterface[] getNeighbors(CellInterface c);

	/**
	 * Cleans the board by setting all cell states to the "empty" state, where
	 * "empty" is client-defined.
	 */
	public void cleanBoard();

	/**
	 * Set board to "initial" state, where "initial" state is client-defined.
	 * Framework will call this method when initializing and re-initializing
	 * board. Re-initializing is done when user selects the "reset" button.
	 */
	public void initBoard();

	/**
	 * Returns the cell at position (row, col) if board is viewed as a 2d array.
	 * 
	 * @param int row - the row of the target cell
	 * @param int col - the column of the target cell
	 * @return CellInterface c - the cell at (row, col) in the board
	 */
	public CellInterface getTargetCell(int row, int col);
}
